//
//  SHgengenViewController.m
//  youjian03
//
//  Created by 常琼 on 14/11/11.
//  Copyright (c) 2014年 com.shouhuobao. All rights reserved.
//

#import "SHgengenViewController.h"
#import "RootViewController.h"
#import "SHKuai100ViewController.h"

@interface SHgengenViewController ()<returndelegate>
@property (weak, nonatomic) IBOutlet UITextField *textfile;

@end

@implementation SHgengenViewController

-(void)getTheCode:(NSString *)code
{
    self.textfile.text = code;
    
    
}

- (IBAction)search:(id)sender {

SHKuai100ViewController *kuaiVc =     [[SHKuai100ViewController alloc] init];
    kuaiVc.typeNo = self.typeNo;
    kuaiVc.postId = self.textfile.text;
    [self.navigationController pushViewController:kuaiVc animated:YES];
    
    
    
    
}
- (IBAction)camera:(UIButton *)sender {

    RootViewController * reader = [[RootViewController alloc]init];
    reader .delegate = self;
    
    [ self presentViewController:reader animated:YES completion:^{
        HMLog(@"yijing tanchu");
        
    }];

}

- (void)viewDidLoad {
    [super viewDidLoad];
    //"我的寄件"标题
    //添加一个有件快递按钮
    UIButton *youjian =  [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 69, 17)];
    [youjian setTitle:@"寄件跟踪" forState:UIControlStateNormal];
    [youjian setTitleColor:[UIColor redColor] forState: UIControlStateNormal];
    
    [youjian setFont:[UIFont fontWithName:@"Helvetica-Bold" size:20]];
    
    youjian.userInteractionEnabled = NO;
    self.navigationItem.titleView = youjian;
    self.navigationController.interactivePopGestureRecognizer.enabled = YES;

    
    //添加左侧按钮
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithImageName:@"back" highImageName:@"back" target:self action:@selector(leftButton)];
    
}
-(void)leftButton
{
    [self.navigationController popViewControllerAnimated:YES];
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    }



@end
